// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_QUOTE_ORDER
// * CreateDate    : 2011/11/21 15:10:47
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/21 15:10:47
// * LastChanger   : 2011/11/21 15:10:47
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class PurQuoteOrderEntity : EntityBase
    {
        public PurQuoteOrderTable TableSchema
        {
            get
            {
                return PurQuoteOrderTable.Current;
            }
		}
		
		public PurQuoteOrderEntity()
        {

        }
		
		public PurQuoteOrderEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.QuoteOrderId = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ORDER_ID"]));
			this.PurchaseOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PURCHASE_ORDER_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.QuoteOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ORDER_CODE"]));
			this.QuoteDepartment = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_DEPARTMENT"]));
			this.QuotePerson = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_PERSON"]));
			this.QuoteTotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["QUOTE_TOTAL_AMOUNT"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.QuoteDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["QUOTE_DATE"]));
			this.DeliveryRequiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_REQUIRED_DATE"]));
			this.DeliveryPlanDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_PLAN_DATE"]));
			this.QuoteExpiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["QUOTE_EXPIRED_DATE"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.IsTax = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_TAX"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.AttachedFile = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_FILE"]));
        }
		
		public PurQuoteOrderEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.QuoteOrderId = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ORDER_ID"]));
			this.PurchaseOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PURCHASE_ORDER_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.QuoteOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ORDER_CODE"]));
			this.QuoteDepartment = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_DEPARTMENT"]));
			this.QuotePerson = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_PERSON"]));
			this.QuoteTotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["QUOTE_TOTAL_AMOUNT"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.QuoteDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["QUOTE_DATE"]));
			this.DeliveryRequiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_REQUIRED_DATE"]));
			this.DeliveryPlanDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_PLAN_DATE"]));
			this.QuoteExpiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["QUOTE_EXPIRED_DATE"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.IsTax = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_TAX"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.AttachedFile = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_FILE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return PurQuoteOrderTable.Current;
            }
        }
		
		#region Perporty List
        public string QuoteOrderId
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_QUOTE_ORDER_ID)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_ORDER_ID, value); }
        }
		
        public string PurchaseOrderId
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_PURCHASE_ORDER_ID)); }
            set { SetData(PurQuoteOrderTable.C_PURCHASE_ORDER_ID, value); }
        }
		
        public string SupplierId
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_SUPPLIER_ID)); }
            set { SetData(PurQuoteOrderTable.C_SUPPLIER_ID, value); }
        }
		
        public string QuoteOrderCode
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_QUOTE_ORDER_CODE)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_ORDER_CODE, value); }
        }
		
        public string QuoteDepartment
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_QUOTE_DEPARTMENT)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_DEPARTMENT, value); }
        }
		
        public string QuotePerson
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_QUOTE_PERSON)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_PERSON, value); }
        }
		
        public decimal QuoteTotalAmount
        {
            get { return Convert.ToDecimal(GetData(PurQuoteOrderTable.C_QUOTE_TOTAL_AMOUNT)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_TOTAL_AMOUNT, value); }
        }
		
        public string Currency
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_CURRENCY)); }
            set { SetData(PurQuoteOrderTable.C_CURRENCY, value); }
        }
		
        public DateTime QuoteDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_QUOTE_DATE)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_DATE, value); }
        }
		
        public DateTime DeliveryRequiredDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_DELIVERY_REQUIRED_DATE)); }
            set { SetData(PurQuoteOrderTable.C_DELIVERY_REQUIRED_DATE, value); }
        }
		
        public DateTime DeliveryPlanDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_DELIVERY_PLAN_DATE)); }
            set { SetData(PurQuoteOrderTable.C_DELIVERY_PLAN_DATE, value); }
        }
		
        public DateTime QuoteExpiredDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_QUOTE_EXPIRED_DATE)); }
            set { SetData(PurQuoteOrderTable.C_QUOTE_EXPIRED_DATE, value); }
        }
		
        public string PaymentType
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_PAYMENT_TYPE)); }
            set { SetData(PurQuoteOrderTable.C_PAYMENT_TYPE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_REMARK)); }
            set { SetData(PurQuoteOrderTable.C_REMARK, value); }
        }
		
        public int IsTax
        {
            get { return Convert.ToInt32(GetData(PurQuoteOrderTable.C_IS_TAX)); }
            set { SetData(PurQuoteOrderTable.C_IS_TAX, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_CREATED_DATE)); }
            set { SetData(PurQuoteOrderTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_CREATED_BY)); }
            set { SetData(PurQuoteOrderTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(PurQuoteOrderTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(PurQuoteOrderTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(PurQuoteOrderTable.C_APPROVED_DATE)); }
            set { SetData(PurQuoteOrderTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_APPROVED_BY)); }
            set { SetData(PurQuoteOrderTable.C_APPROVED_BY, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_STATUS)); }
            set { SetData(PurQuoteOrderTable.C_STATUS, value); }
        }
		
        public string AttachedFile
        {
            get { return Convert.ToString(GetData(PurQuoteOrderTable.C_ATTACHED_FILE)); }
            set { SetData(PurQuoteOrderTable.C_ATTACHED_FILE, value); }
        }
		
		#endregion
	}
	
	
}	

